home *** CD-ROM | disk | FTP | other *** search
-
- Q&D CheckIOPorts v1.32
-
-
- Copyright (c) 1996 by PhG
- All rights reserved
-
- Last revision on June 6, 1996
-
-
- OVERVIEW
-
- CHKIO *tries* to locate I/O ports used by cards installed in a PC.
- It can use four different spying methods (of various usefulness)
- to perform this search. Even better: it can be run as a TSR, in
- order to spy on those clever (i.e. here: well-designed) cards which
- keep a low profile and do not reveal their presence in a system
- unless their I/O ports are activated.
-
- This program was written for personal use and curiosity: as such,
- it is not a masterpiece nor is it foolproof. Yet, it may be of
- some use to some people, for I cannot remember any utility
- performing its humble task (which does *not* mean such an utility
- does not *already* exists!). Besides, it raises some interesting
- problems about hardware (at least, from a software point of view).
-
- So...
-
-
- SYSTEM REQUIREMENTS
-
- CHKIO should run on any IBM PC or compatible with a 8086 processor
- or better, and DOS 3.1 or higher. Anyway, when run as a TSR, it
- *requires* about 350 Kb of EMS memory (yes, EMS, not XMS).
-
- Warning!!! In your own interest, please *read* the full
- documentation file *before* running the program!
-
-
- CAVEATS
-
- If you do not feel comfortable with a program which _READS_ I/O
- ports (nothing else!), then do *not* run CHKIO. If you do not
- realize *all* the implications of reading I/O ports without knowing
- what you're doing, then do *not* run CHKIO. Program should be run
- from plain vanilla DOS only: it was *not* intended to be run in any
- form of clever DOS emulation such as You-Know-Who's graphics
- integrators and/or operating systems.
-
- CHKIO is intended as a (small) diagnostic utility: when running it,
- especially as a TSR, do *not* expect normal behavior of you PC.
- For instance, reading hard disk and floppy controllers I/O ports
- ($320..$32F and $3F0..$3F7) *may* damage your data (it has *not*
- occurred during extensive tests, but it *may* happen: so, better
- be safe than sorry!). Use the "divide and conquer" approach and
- do not try to test for too big a range of I/O ports!
-
- In other words, if you run CHKIO, run it to detect a card activity,
- but don't expect the card to run normally. Once you have located
- probable I/O addresses used by a card, turn your PC off then on
- again, in order to restart with a clean system. CHKIO does nothing
- but *read* I/O ports: it may prevent other programs (measure, for
- instance) from getting data they expect. When run as a TSR, CHKIO
- forces a small penalty on your system, which may be an annoyance
- for a realtime measurement board.
-
- So, do *not* forget CHKIO will help you to diagnostic and to
- *diagnostic* ONLY!
-
-
- USAGE
-
- Just type CHKIO from DOS command prompt in order to get this help:
-
- Q&D CheckIOPorts v1.32 (c) PhG 1996
-
- Syntax: 'CHKIO <options> [>file]', where options (without / or -) are:
-
- - <port> [count] checks 'count' I/O ports starting from 'port'
- 'port' belongs to the [$0000..$03FF] range, 'count' default value is 16
- Values are given in decimal, unless they begin with a '$' for hexadecimal
- - FREE shows the most probably unused I/O ports in the [$0200..$03FF] range
- - USED shows the most probably used I/O ports in the [$0200..$03FF] range
- - SAMPLE <ticks> <port> [count] install program as a TSR
- 'ticks' is the sampling frequency (one tick is 1/18.2s)
- - RESET reinitializes results got from TSR
- - REPORT dumps current results to CHKIO.RPT file
- Previous file of same name is kept as CHKIO.BAK
- - STATUS shows current TSR status
- - UNLOAD tries and unloads program from memory"
-
- For SAFETY, FREE and USED commands do NOT test hard disk and floppy I/O ports.
- Program can *try* 4 methods to check whether I/O ports are used or not.
- To specify survey method, enter M0, M1, M2 or M3 as the *first* parameter.
- Default is M0. Beware: once program is TSR, you CANNOT change survey method!
-
- Special thanks to Jean-Claude Gaertner and Rick Harris who kindly devoted
- some of their precious time in order to have a look at this small utility!
-
- Here are some examples of use from DOS command line:
-
- CHKIO $220
- CHKIO $330 8
- CHKIO FREE
- CHKIO USED
- CHKIO SAMPLE 18 $300 32
- CHKIO REPORT
- CHKIO RESET
- CHKIO UNLOAD
- CHKIO M1 $220
- CHKIO M2 SAMPLE 32 $220
-
- Note you'll have to enter exactly "yES" ("y", "E", "S" without
- quotes, of course!) in order to run the program after you've
- specified a valid command: this is to protect you from yourself.
- Logically, you _should_ notice the following message:
-
- ****************************************************************
- * Warning!!! Think twice before you run this program! *
- * In your own interest, be sure you have fully read CHKIO's *
- * documentation *before* you proceed, for running this program *
- * without knowing what it is about is definitely *not* wise! *
- * This warning is all the more important with TSR option! *
- ****************************************************************
-
- There's even a small beep for added safety. <g> In the same way,
- you'll have to enter exactly "yES" in order to go back to DOS when
- the program ends, after the following message (again, with an added
- small beep):
-
- ****************************************************************
- * Warning!!! Think twice before you exit this program! *
- * Whatever I/O ports have been tested, you definitely should *
- * turn you PC off then on again! At any case, you'd better *
- * not exit to DOS now but reboot your system instead! *
- ****************************************************************
-
- Should you enter anything EXCEPT "yES" string, your PC will be
- rebooted for safety (an even greater safety would be to turn it off
- then on again... which unfortunately cannot be done by current
- software! <g>). You'll have to do something in order to remove the
- boring message:
-
- ********************************************************
- * System is now willingly lost in an infinite loop! *
- * Either reboot with Ctrl-Alt-Del or the Reset button! *
- * Even better, turn your PC off then on again! *
- ********************************************************
-
- I first thought of a cryptic "Lost in the Twilight Zone", but,
- well... this utility is supposed to be a little serious. ;-)
-
- Beginning with version 1.3, in order to protect the innocent, hard
- disk and floppy controllers I/O ports ($320..$32F and $3F0..$3F7
- if Thom Hogan's _Programmer's PC Sourcebook_ is right!) are *not*
- tested. If you want to test these ports, you'll have to specify
- them individually at your own risk! If this potentially dangerous
- addresses are to be tested, you'll get the following message on
- screen:
-
- Program output results can be redirected to a file in the usual DOS
- way (for instance, CHKIO FREE > FOOBAR.TXT).
-
- THEORY
-
- I wrote this utility a few days ago because I suddenly wondered
- what I/O ports were used by my Panasonic CR-562B CD-ROM proprietary
- card. I tried to locate infos about software detection of hardware
- ports without any real success. With a few lines of code, I
- thought I could assume that any port returning $FFFF word value
- when read was to be considered as free. A TSR version of CHKIO was
- suggested by a friend, for these cards which use I/O ports only
- when needed.
-
- I'm not a hardware specialist (and I'm no longer a software
- writer). So, I have implemented, just in case, and even if it may
- look stupid, four "detection" methods in CHKIO.
-
- Method 0 reads a byte from port address then a byte from address+1,
- and checks if the word value just read equals $FFFF.
-
- Method 1 reads a byte from port address then a byte from address+1,
- and checks if the two bytes differ from one another.
-
- Method 2 reads two bytes in succession from port address and checks
- if they are both equal to $FF.
-
- Method 3 reads two bytes in succession from port address and checks
- if the two bytes differ from one another.
-
- My guess is that method 0 is to be used (most cards are supposed
- to read words). Yet, I decided to include "cookie beta parameter"
- in order to let other people have fun (!) experimenting with these
- four methods. Hence the [ M0 | M1 | M2 | M3 ] parameter. Method
- 3 seems uterless useless.
-
- Most cheap (or badly designed) cards seem to reveal their presence
- on a PC by returning values different from $FFFF on some ports,
- whether software drivers (if needed) are present or not.
-
- If you have any infos about that point, you're welcome to share
- them!
-
-
- ERROR MESSAGES
-
- They are self-explanatory.
-
-
- REVISION HISTORY
-
- Version 1.32 completed on June 6, 1996.
- Fixed a small discrepancy between this doc and help screen.
- Removed the possibility for the TSR to use a swapfile, for
- safety. Thanks again for pointing these ones, Rick!
- Included for inquisitive mindes are the original M2 code and
- current Basic code.
- Version 1.3 completed on May 26, 1996.
- "No future", as they say... Well... Added an opening warning
- screen and a closing warning screen at request of Rick
- Harris, in order to protect the innocent and those people who
- are proud to never read the documentation. <g> For the same
- reason, FREE and USED commands no longer check hard disk and
- floppy controllers I/O ports ($320..$32F and $3F0..$3F7).
- Version 1.2 completed on April 23, 1996.
- Fixed a few typos, code frozen and no future!
- Version 1.12 completed on April 19, 1996.
- Fixed a few typos in documentations and in source code
- (including one which prevented 1.11 from working as 1.1
- did!). Program sent to Rick Harris, sysop of Benchmark &
- Standards CIS Forum, for beta test.
- Version 1.11 completed on April 17, 1996.
- Default range for FREE and USED commands is now limited to
- $0200..$03FF.
- Version 1.1 completed on April 15, 1996.
- Full rewrite in PowerBASIC v3.1, for TopSpeed Modula-2 TSR
- would have required about 50 Kb of conventional memory.
- Version 1.0 created on April 8, 1996.
- Written the Quick & Dirty way in TopSpeed Modula-2 v3.1.
-
-
- SPECIAL THANKS
-
- Special thanks to Jean-Claude Gaertner and Rick Harris who kindly
- devoted some of their precious time in order to have a look at this
- small utility! They suggested some great ideas, most of which I'm
- unfortunately unable to implement in this Q&D utility.
-
-
- DISCLAIMER
-
- Legal mumbo-jumbo and the like. I understand I'm supposed to
- include it, just in case. Sorry! ;-)
-
- The CHKIO package is provided *without* warranty of *any* kind,
- except for this one: the executable CHKIO.EXE and its documentation
- CHKIO.DOC will use some space on your hard disk (or on any other
- storage device). Moreover, CHKIO will keep your CPU busy when you
- run it. The author hereby disclaims all warranties relating to
- this software, whether express or implied, including without
- limitation any implied warranties of merchantability or fitness for
- any particular purpose. The author will not be liable for any
- special, incidental, consequential, indirect or similar damages due
- to loss of data or any other reason, even if the author has been
- advised of the possibility of such damages. In no event shall the
- author's liability for any damages ever exceed the price paid for
- the license to use software (i.e. nothing at all, for CHKIO is
- freeware!), regardless of the form of the claim. The person using
- the software bears all risk as to the quality and performance of
- the software. Caveat utilisator, as they say in pseudolatin.
-
-
- LICENSE AND COPYING
-
- CHKIO is freeware, for I know shareware does not pay, and
- postcardware does not even work better <g>. Moreover, every
- programmer always knows he can do better than any utility he looks
- at, provided he has time enough! ;-). And well... I found enough
- interesting things in Benchmark & Standards forum to try and give
- them back something. Yet, I reserve all "rights", if any, to the
- program and its source code. If you were to create a derivative
- work from my Q&D source code, please acknowledge the original work
- (it's a matter of principle). Please release only original
- unmodified CHKIO.LZH archive with the following files kept
- together : CHKIO.EXE, CHKIO.BAS, CHKPORTS.MOD, CHKPORTS.PR and
- CHKIO.DOC.
-
- You may still let me know if this program was useful to you or not!
-
-
- BUGS
-
- None known to date. Which does not mean there are none. Please
- read supra CAVEATS section.
-
-
- FUTURE -- IF ANY!
-
- No.
-
-
- IMPORTANT NOTE
-
- I apologize for the... well, quality of my writing in English. To
- me, this language is to be read, not written <cum grano salis>!
-